package com.pinxixi.api.category;

import com.pinxixi.framework.domain.category.Category;
import com.pinxixi.framework.model.response.ListResponseResult;
import com.pinxixi.framework.model.response.QueryResponseResult;
import com.pinxixi.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(value="分类微服务API",description = "分类微服务CRUD")
public interface CategoryControllerApi {

    @ApiOperation("全部分类接口")
    ListResponseResult<Category> findAll();

    @ApiOperation("分类列表接口")
    ListResponseResult<Category> findListByPid(Long parentId);

    @ApiOperation("分类查询接口")
    QueryResponseResult<Category> findOne(Long id);

    @ApiOperation("分类添加、修改接口")
    ResponseResult save(Category category);

    @ApiOperation("分类批量删除接口")
    ResponseResult deleteAll(Long[] ids);

    @ApiOperation("根据名称查询")
    QueryResponseResult<Category> findByName(String name);

}
